package com.reverie.controller;

import com.reverie.common.pojo.CommonResult;
import com.reverie.entity.GoodsAttr;
import com.reverie.service.IGoodsAttrService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Rui.Zhou
 * @since 2024-02-03
 */
@RestController
@RequestMapping("/goodAttr")
public class GoodsAttrController {
    @Resource
    private IGoodsAttrService goodsAttrService;

    @PostMapping("delete")
    public CommonResult<Boolean> deleteById(@RequestBody GoodsAttr goodsAttr){
        return CommonResult.data(goodsAttrService.removeById(goodsAttr.getGoodsAttrId()));
    }
}
